home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / p063b9s.zip / UNIT / POPHELP.PAS < prev    next >
Pascal/Delphi Source File  |  1996-04-20  |  2KB  |  57 lines

  1. UNIT PopHelp;
  2. {╔══════════════════════════════════════════════════════════════════════════╗}
  3. {║ Help routines for OPro                        Last changed: 20.04.96  SA ║}
  4. {║                                                                          ║}
  5. {║                         (C) Copyright 1989-93 by                         ║}
  6. {║       Dan Wulff, Jens Sandalgaard, Steen Christensen & S¢ren Ager        ║}
  7. {║                                                                          ║}
  8. {║ This source may not be given to anybody, without the written permission  ║}
  9. {║ from The Portal Team.                                                    ║}
  10. {╚══════════════════════════════════════════════════════════════════════════╝}
  11. {$I POPDEFS.INC}
  12.  
  13. INTERFACE
  14.  
  15. USES Use32;
  16.  
  17. PROCEDURE HelpRoutine(UnitCode: Byte; IdPtr: Pointer; HelpIndex: Word);
  18.  
  19. IMPLEMENTATION
  20.  
  21. USES OpCrt, OpWindow, OpFrame, OpPick, OpHelp,
  22.      PoPTypes, Globals;
  23.  
  24.   PROCEDURE HelpRoutine(UnitCode: Byte; IdPtr: Pointer; HelpIndex: Word);
  25.   VAR
  26.     Help   : ScrollingHelpWindowPtr;
  27.     Offset : Byte;
  28.   BEGIN
  29.     IF HelpIndex<>0 THEN
  30.     BEGIN
  31.       Offset:=(ScreenWidth-80) DIV 2;
  32.       New(Help, InitCustom(10+Offset,7,70+Offset,ScreenHeight-6,Cfg.Color[4],
  33.                            wBordered+wClear,StartPath+PoPHelpFileName,PickHorizontal));
  34.       IF Help<>NIL  THEN
  35.       BEGIN
  36.         WITH Help^ DO
  37.         BEGIN
  38.           hwOptionsOn(hwHighlightXref);
  39.           IF Cfg.Screen.ExplodingWin THEN EnableExplosions(10);
  40.           wFrame.AddHeader(' Topic Index ', heTC);
  41.           wFrame.AddShadow(shBR,shSeeThru);
  42.           AddMoreHeader(' ││ for more ', heBR,#24,#25,'',2,3,0);
  43.           AddTopicHeader(1,40,heTC);
  44.           AddMoreHelpHeader(' PgUp/PgDn for more ',heBR,'PgUp','PgDn','/',2,7,6);
  45.         END;
  46.         IF Not Help^.TopicExists(HelpIndex) THEN HelpIndex:=1;
  47.         Help^.SetTopic(HelpIndex);
  48.         Help^.Process;
  49.         Help^.EraseHidden;
  50.         Dispose(Help, Done);
  51.       END;
  52.     END;
  53.   END;
  54.  
  55. END.
  56.  
  57.